<%@Page Language="VB"%>
<html><head>
<title>ASP.NET Control</title>
</head>
<body bgcolor="#ffffff">
<form runat=server>
<span class="heading">
ASP.NET Control and Array</span><hr />
<table border="0">
<tr><td nowrap="nowrap" valign=top>
HTML <b>select</b> element:<br />
<select id="MySelectList" r
unat="server" />
<b>ASP:DropDownList</b> control:<br />
<ASP:DropDownList id="MyDropDown" 
runat="server" />
<b>ASP:ListBox</b> control:<br />
<ASP:ListBox id="MyASPList" 
runat="server" />
<b>ASP:DataGrid</b> control:<br />
<ASP:DataGrid id="MyDataGrid" 
runat="server" />
<b>ASP:Repeater</b> control:<br />
<ASP:Repeater id="MyRepeater" 
runat="server">
  <ItemTemplate>
    <%# Container.DataItem %>
  </ItemTemplate>
</ASP:Repeater>
</td>
<td nowrap="nowrap">&nbsp;</td>
<td nowrap="nowrap">
<b>ASP:DataList</b> control:<br />
<ASP:DataList id="MyDataList" 
runat="server">
  <ItemTemplate>
    <%# Container.DataItem %>
  </ItemTemplate>
</ASP:DataList>
<b>ASP:CheckBoxList</b> control:<br />
<ASP:CheckBoxList id="MyCheckList" runat="server" />
<b>ASP:RadioButtonList</b> control:<br />
<ASP:RadioButtonList id="MyRadioList" runat="server" />
</td></tr>
</table>
</form>
<script language="vb" runat="server">
Sub Page_Load()
   Dim arrValues As New ArrayList(5)
   arrValues.Add("Microsoft")
   arrValues.Add("Sun")
   arrValues.Add("IBM")
   arrValues.Add("Compaq")
   arrValues.Add("Oracle")
   MySelectList.DataSource = arrValues
   MyDropDown.DataSource = arrValues
   MyASPList.DataSource = arrValues
   MyDataGrid.DataSource = arrValues
   MyRepeater.DataSource = arrValues
   MyDataList.DataSource = arrValues
   MyCheckList.DataSource = arrValues
   MyRadioList.DataSource = arrValues
   Page.DataBind()
End Sub
</script>
</body>
</html>
